#ifndef ROLEMANAGER_H
#define ROLEMANAGER_H

#include "api/systemManager/rolemanagerapi.h"
#include <QObject>
#include <ui_index.h>
#include <QList>
#include <QNetworkReply>
#include <QPixmap>
#include <QDialog>
#include <QVBoxLayout>
#include <QWidget>
#include <Entity/DictData.h>


class RoleManager : public QObject
{
    Q_OBJECT
public:
    explicit RoleManager(Ui::Index *ui,QObject *parent = nullptr);

protected:
   bool eventFilter(QObject *obj, QEvent *event);
signals:
private slots:
    void pageSizeChanged(int index);
    void deleteByIds();
private:
    Ui::Index *ui;
    RoleManagerApi roleManagerApi;
    QList<Role> roleList;
    QList<DictData> dictList;
    int pageSize;
    int total;
    int currentPage;
    int totalPage;
    Utils utils;
    QDialog *moreDlg;

    void init();
    void getList();
    void getDict();
    void initTableWidget();
    void initSearchArea();
    void initPageInfo();

};

#endif // ROLEMANAGER_H
